home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 5
/
Amiga Plus Sonderheft 1996 #5.iso
/
programme
/
imagedesk304
/
import_ps
/
import_ps2.idesk
< prev
next >
Wrap
Text File
|
1996-05-02
|
2KB
|
78 lines
/* ---------------- ARexx-Script zur Uebergabe eines Bildes an PageStream 3.0i ------------ */
/* ------------------------------------- Version 1.0 -------------------------------------- */
/* ------------------- von Volkmar Funke -- EMail: Volkmar_Funke@BN.maus.de ----------------*/
/* --- Dieses ARexx-Script importiert ein ausgewaehltes Bild von ImageDesk in PageStream ---*/
/* ----- ohne Beruecksichtigung, das PageStream kein JPEG unterstuetzt (Zusatzmodul) -------*/
OPTIONS RESULTS
PARSE ARG iname itype ipos
/* Sicherstellung das ARexx supportet ist */
if ~show('L','rexxsupport.library') then
CALL ADDLIB('rexxsupport.library',0,-30)
if ~show('L','softlogik:libs/slarexxsupport.library') then
CALL ADDLIB('softlogik:libs/slarexxsupport.library', 0, -30)
if ~show(P, 'PAGESTREAM') then do /* Fehlermeldung falls PageStream nicht gestartet ist*/
ADDRESS 'IDESK_REXXPORT'
IDREQUEST "OK" '" PageStream nicht gestartet "'
EXIT
end
ADDRESS 'PAGESTREAM'
/* Uebergabe der Grafik, falls kein Dokument geoeffnet Fehlermeldung */
'refresh wait'
placegraphic FILE '"'||iname||'"'
if rc~=0 then do
ADDRESS 'IDESK_REXXPORT'
IDREQUEST "OK" '" Kein Dokument in PageStream offen "'
signal cancel
end
/* Typfestlegung und Anfrage ob ausgelgert werden soll */
'getobject type objtype'
objnum=result
trace ?i
/* Position und Groesse festlegen, wie in PageStream 2.2 */
getregion coord message '" Klicke Position und/oder ziehe Groesse "'
if rc=10 then do
'deleteobject'
signal cancel
end
if (abs(p2d(coord.x1)-p2d(coord.x2)))<0.25 | (abs(p2d(coord.y1)-p2d(coord.y2)))<0.25 then DO
if objtype=12 then getpicture position pstem
if objtype=2 then getdrawing position pstem
if objtype=13 then geteps position pstem
coord.x2=p2d(pstem.right)+p2d(coord.x1)
coord.y2=p2d(pstem.bottom)+p2d(coord.y1)
end
if objtype=12 then editpicture position coord.x1 coord.y1 coord.x2 coord.y2
if objtype=2 then editdrawing position coord.x1 coord.y1 coord.x2 coord.y2
if objtype=13 then editeps position coord.x1 coord.y1 coord.x2 coord.y2
'refresh continue'
EXIT
CANCEL:
ADDRESS 'PAGESTREAM' /* Muss durchgefuehrt werden, sonst keine Darstellung wenn neues */
'refresh continue' /* Dokument geoeffnet wird */
EXIT